﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AppFramework.Logger {
    public interface ILogger {
        ILogger Trace(string message);
        ILogger Debug(string message);
        ILogger Info(string message);
        ILogger Warn(string message);
        ILogger Error(string message, Exception ex = null);
        ILogger Fatal(string message, Exception ex = null);

        /// <summary>
        /// 日志产生事件
        /// </summary>

        public event Action<LogInfo> OnLogYield;

        /// <summary>
        /// 默认日记记录器
        /// </summary>
        public static ILogger Default { get; } = new LoggerSerilog();

    }
}
